// 菜单相关的接口
import request from "./request";

//获取当前用户菜单
export const getUserMenus = () => request.get("/menu/user/list");

export const getMenus = (params = {}) => request.get("/menu/list", { params });

export const saveOrUpdateMenu = (data) => request.post("/menu", data);

export const deleteMenu = (id) => {
  //传递来的id是一个数组，但是该接口只能单独传递一个数据
  return request.delete(`/menu/${id[0]}`);
};

export const getMenuOption = () => request.get("/menu/option");
